//
//  RequestHandler.h
//  EWSClient
//
//  Created by Suraeva Yana on 26.11.12.
//  Copyright (c) 2012 Сураева Яна. All rights reserved.
//  Set up request settings

#import <Foundation/Foundation.h>
#import "Folder.h"
#import "Mail.h"


@interface RequestHandler : NSObject
@property (nonatomic, retain) NSURL *serverURL;
@property (nonatomic, retain) NSString *username;
@property (nonatomic, retain) NSString *password;

- (id) initWithServerURL:(NSURL *)serverURL withUsername:(NSString *)username withPassword:(NSString *)password;
- (id) initWithUserDefaults;

// Запрос для проверки пользовательских данных
- (BOOL) testUserCredential;
- (Folder *) getFolderWithID:(NSString *)folderID;
- (Folder *) getFolderWithDistinguishedID:(NSString *)distinguishedFolderID;

- (Mail *) getItemWithID:(NSString *)itemID;

- (NSDictionary *) syncItemsInFoldeWithID:(NSString *)folderID usingSyncState:(NSString *)syncState;

- (NSDictionary *) syncFolderHierarchyUsingSyncState:(NSString *)syncState;

- (NSArray *) getFoldersInFolderWithID:(NSString *)folderID;
- (NSArray *) getFoldersInFolderWithDistinguishedID:(NSString *)distinguishedFolderID;

- (NSArray *) getItemsInFolderWithID:(NSString *)folderID;
- (NSArray *) getItemsInFolderWithDistinguishedID:(NSString *)distinguishedFolderID;
- (NSDictionary *) getAttachmentWithID:(NSString *)attachmentID;

@end
